package com.xuelang.pipeline.infrastructure.pipeline.converter;

import com.xuelang.pipeline.domain.pipeline.PipelineInstance;
import com.xuelang.pipeline.infrastructure.pipeline.dataobject.PipelineInstanceDO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * <p>流水线实例DO转换类</p>
 *
 * @author : yixin.lys
 * @date : 2024-06-19 10:15
 **/
@Mapper
public interface PipelineInstanceToDOConverter {

    PipelineInstanceToDOConverter INSTANCE = Mappers.getMapper(PipelineInstanceToDOConverter.class);

    /**
     * 从DO转换
     * @param target
     * @return
     */
    PipelineInstance fromDO(PipelineInstanceDO target);

    /**
     * 转换为DO
     * @param target
     * @return
     */
    PipelineInstanceDO toDO(PipelineInstance target);

}
